﻿/*CREATE TRIGGER [dbo].[Tenencias_DeletionTrigger] 
    ON [Tenencias] 
    AFTER DELETE 
AS 
SET NOCOUNT ON 
UPDATE [dbo].[Tenencias_Tombstone] 
    SET [DeletionDate] = GETUTCDATE() 
    FROM deleted 
    WHERE deleted.[TenenciaGuid] = [Tenencias_Tombstone].[TenenciaGuid] 
IF @@ROWCOUNT = 0 
BEGIN 
    INSERT INTO [dbo].[Tenencias_Tombstone] 
    ([TenenciaGuid], DeletionDate)
    SELECT [TenenciaGuid], GETUTCDATE()
    FROM deleted 
END*/